<%@ page contentType="text/html; charset=utf-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<c:if test="${successfulMessage != null}">
	<div class="valid_box">
		<spring:message code="successful.updateads" />
	</div>
</c:if>
<form:form action="" method="post" cssClass="niceform"
	commandName="adsForm" enctype="multipart/form-data">
	<form:errors path="*" cssClass="error_box" element="div" />
	<fieldset>
		<dl>
			<dt>
				<label for=imageLeft><spring:message code="imageLeft" /></label>
			</dt>
			<dd>
				<form:input path="imageLeft" type="file"
					onchange="previewImage1(this)"
					accept="image/jpg,image/jpeg,image/gif,image/png"
					style="width: 150%;" />
			</dd>
			<dt style="position: absolute; margin-top: 35px;">
				<label for=imageRight><spring:message code="imageRight" /></label>
			</dt>
			<dd>
				<form:input path="imageRight" type="file"
					onchange="previewImage2(this)"
					accept="image/jpg,image/jpeg,image/gif,image/png"
					style="width: 150%;" />
			</dd>
		</dl>

		<dl class="submit" style="position: relative; left: 118px;">
			<dd>
				<input type="submit" name="submit" id="submit"
					value="<spring:message code="save" />" />
			</dd>
		</dl>
	</fieldset>
</form:form>
<div style="text-align: center;">
	<img id="image-preview-1" class="image-preview-1 ads"
		src="<c:url value="/images/ads/1.jpg"/>" alt="" /> <img
		id="image-preview-2" class="image-preview-1 ads"
		src="<c:url value="/images/ads/2.jpg"/>" alt="" />
</div>